{% extends "rudiment_index.html" %}
{% block breadcrumb %}初始化配置管理{% endblock %}
{% block content %}
    <div class="row">
    <form class="form-horizontal" action="/conf/conf_save/" method="POST" id="form">
        {% csrf_token %}
        <legend>初始化配置</legend>
           <div class="form-group">
              <label class="col-sm-2 control-label" for="host_ip">Hostname：</label>
              <div class="col-sm-3">
                  {% if host_ip %}
                 <input class="form-control validate[required,custom[ipv4]]" name="host_name" id="hostname" type="text" value="{{ host_name }}" placeholder="启动以后会默认自动获取hostname( • ̀ω•́ )✧"/>
                {% else %}
                <input class="form-control validate[required,custom[ipv4]]" name="host_name" id="hostname" type="text" value="" placeholder="启动以后会默认自动获取hostname( • ̀ω•́ )✧"/>
                {% endif %}
              </div>
           </div>

            <div class="form-group">
              <label class="col-sm-2 control-label" for="host_ip">主机IP：</label>
              <div class="col-sm-3">
                  {% if host_ip %}
                 <input class="form-control validate[required,custom[ipv4]]" name="host_ip" id="host_ip" type="text" value="{{ host_ip }}" placeholder="启动以后会默认自动获取ip( • ̀ω•́ )✧"/>
                {% else %}
                <input class="form-control validate[required,custom[ipv4]]" name="host_ip" id="host_ip" type="text" value="" placeholder="启动以后会默认自动获取ip( • ̀ω•́ )✧"/>
                {% endif %}
              </div>
           </div>


           <div class="form-group">
              <label class="col-sm-2 control-label" for="port">port：</label>
              <div class="col-sm-3">
                  {% if file_path %}
                        <input class="form-control validate[required]" name="port" id="port" type="text" value="{{ port }}" placeholder="{{ port }}"/>
                    {% else %}
                      <input class="form-control validate[required]" name="port" id="port" type="text" value="80" placeholder="默认80端口，镜像也是如此٩(๑❛ᴗ❛๑)۶" />
                  <!--placeholder="80"-->
                  {% endif %}
              </div>

            </div>


           <div class="form-group">
              <label class="col-sm-2 control-label" for="file_path">dockerfile路径：</label>
              <div class="col-sm-3">
                  {% if file_path %}
                        <input class="form-control validate[required]" name="file_path" id="file_path" type="text" value="{{ file_path }}" placeholder="{{ file_path }}"/>
                    {% else %}
                      <input class="form-control validate[required]" name="file_path" id="file_path" type="text" value="/home/django/dockerfiles/" placeholder="默认路径:/home/django/dockerfiles/"/>
                  {% endif %}
              </div>

            </div>

             <div class="form-group">
              <label class="col-sm-2 control-label" for="logpath">日志路径：</label>
              <div class="col-sm-3">
                  {% if file_path %}
                        <input class="form-control validate[required]" name="logpath" id="logpath" type="text" value="{{ logpath }}" placeholder="{{ logpath }}"/>
                    {% else %}
                      <input class="form-control validate[required]" name="logpath" id="logpath" type="text" value="/home/django/logs/" placeholder="默认路径:/home/django/logs/" />
                  {% endif %}
              </div>

            </div>


           <div class="form-group">
              <label class="col-sm-2 control-label" for="mysqldb">Mysqldb：</label>
              <div class="col-sm-3">
                  {% if file_path %}
                        <input class="form-control validate[required]" name="mysqldb" id="mysqldb" type="text" value="{{ mysqldb }}" placeholder="疯狂女孩٩(๑>◡<๑)۶ " />
                    {% else %}
                      <input class="form-control validate[required]" name="mysqldb" id="mysqldb" type="text" value="crazygril" placeholder="疯狂女孩٩(๑>◡<๑)۶ " />
                  {% endif %}
              </div>

            </div>
           <div class="form-group">
              <label class="col-sm-2 control-label" for="MysqlIp">MysqlIp：</label>
              <div class="col-sm-3">
                  {% if file_path %}
                        <input class="form-control validate[required]" name="mysqlip" id="mysqlip" type="text" value="{{ mysqlip }}" placeholder="{{ mysqlip }}"/>
                    {% else %}
                      <input class="form-control validate[required]" name="mysqlip" id="mysqlip" type="text"  value="127.0.0.1" placeholder="默认ip:127.0.0.1"/>
                  {% endif %}
              </div>

            </div>
           <div class="form-group">
              <label class="col-sm-2 control-label" for="MysqlPort">MysqlPort：</label>
              <div class="col-sm-3">
                  {% if file_path %}
                        <input class="form-control validate[required]" name="mysqlport" id="mysqlport" type="text" value="{{ mysqlport }}" placeholder="{{ mysqlport }}"/>
                    {% else %}
                      <input class="form-control validate[required]" name="mysqlport" id="mysqlport" type="text" value="3306" placeholder="默认端口:3306"/>
                  {% endif %}
              </div>

            </div>


        <div class="form-group">
              <label class="col-sm-2 control-label" for="MysqlUser">MysqlUser：</label>
              <div class="col-sm-3">
                  {% if file_path %}
                        <input class="form-control validate[required]" name="MysqlUser" id="MysqlUser" type="text" value="{{ mysqluser }}" placeholder="{{ mysqluser }}" />
                    {% else %}
                      <input class="form-control validate[required]" name="MysqlUser" id="MysqlUser" type="text" value="root" placeholder="默认root"/>
                  {% endif %}
              </div>

            </div>


           <div class="form-group">
              <label class="col-sm-2 control-label" for="MysqlPort">MysqlPass：</label>
              <div class="col-sm-3">
                  {% if file_path %}
                        <input class="form-control validate[required]" name="mysqlpass" id="mysqlpass" type="password" value="{{ mysqlpass }}" placeholder="\(*//ω//*)/" />
                    {% else %}
                      <input class="form-control validate[required]" name="mysqlpass" id="mysqlpass" type="password" value="123456" placeholder="\(*//ω//*)/"/>
                  {% endif %}
              </div>

            </div>






           <div class="form-group" >
              <label class="col-sm-2 control-label" for="保存"></label>
              <div class="col-sm-3 text-right ">
                <input type="submit" id="submit" class="btn btn-primary btn-sm" value="保存"/>
              </div>

           </div>
         </form>
 </div>

</div>
{% endblock %}

